package sh.dao;

import sh.orm.annotation.NativeSql;
import sh.dto.BookBoardDto;

import java.util.List;

public interface BookDao<T> {

    /**
     * 获取前n销量的书籍
     * @param n
     * @return
     */
    @NativeSql(value = "select name,count(name) num from t_book group by name order by num DESC LIMIT %d ")
    public List<BookBoardDto> getPrevious(Integer n);

}
